--TEST--
Check for jsonschema  generate object
--SKIPIF--
<?php
if (!extension_loaded("jsonschema")) {
    print "skip";
}
?>
--FILE--
<?php
echo 'object', PHP_EOL;
$value = new stdClass();
$value->name = 'a name';
$value->age = 23;
$value->height = 183.5;
$jsonSchema = new JsonSchema(json_encode($value));

echo assert('{"type":"object","properties":{"name":{"type":"string","format":"regex","pattern":"\/^[a-z0-9]+$\/i","minLength":0,"maxLength":2147483647},"age":{"type":"integer","default":0,"minimum":0,"maximum":2147483647,"exclusiveMinimum":0,"exclusiveMaximum":2147483647},"height":{"type":"number","default":0,"minimum":0,"maximum":2147483647,"exclusiveMinimum":0,"exclusiveMaximum":2147483647}}}' == $jsonSchema->getSchema()), PHP_EOL;
?>
--EXPECT--
1